//**********************************************************************************
//  PP3_1.java         Author:Tang Caiming
//
//  Enter a name and last name, and output a string that is composed of the 
//  first letter of the user's name, plus a surname not exceeding the first five
//  letters, and a random number of 10-99.
//**********************************************************************************

import java.util.*;

public class PP3_1
{
   public static void main(String[] args)
   {
      String name, family, last;
     
      Scanner A = new Scanner(System.in);
   
      System.out.println("Enter your family name: ");
      family = A.nextLine();

      System.out.println("Enter your last name: ");
      last = A.nextLine();

      name = family + last;

      System.out.println("Your name is " + name);

      Random ran = new Random();
      
      family = family.substring(0, 5);
      int num1;

      num1 = ran.nextInt(90) + 10;
      System.out.println("The random number that comes out is " + num1);

      System.out.println("Output string: " + family + num1);
   }
}
